using System;
using System.Collections.Generic;
using System.Text;
using NBusiness.Query;

namespace NBusiness.MySql.Query
{
    public class MySqlEqual : MySqlBoolean
    {
        public bool Not
        {
            get { return Operator == MySqlBooleanOperator.NotEqual; }
            set { Operator = (value ? MySqlBooleanOperator.NotEqual : MySqlBooleanOperator.Equal); }
        }
                
        public MySqlEqual()
            : base(MySqlBooleanOperator.Equal)
        { }
        public MySqlEqual(IEvaluatable left, IEvaluatable right)
            : this(left, right, false)
        { }
        public MySqlEqual(IEvaluatable left, IEvaluatable right, bool not)
            : base(left, (not ? MySqlBooleanOperator.NotEqual : MySqlBooleanOperator.Equal), right)
        { }
    }
}
